package com.study.designpatterns.strategy;


import com.study.designpatterns.strategy.behavior.FlyWithWings;
import com.study.designpatterns.strategy.behavior.QuackGuaGua;

/**
 * @author: jzhou
 * @date: 2025/6/14-22:10
 * @version: 1.0
 * @description: 红头鸭实现类
 */
public class RedheadDuck extends Duck {
    // 红头鸭用翅膀飞行，呱呱叫
    public RedheadDuck() {
        this.fly = new FlyWithWings();
        this.quack = new QuackGuaGua();
    }

    @Override
    public void display() {
        System.out.println("外观是红头鸭");
    }
}
